<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/common.css" />
    <link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/myspace.css" />
    <link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/dl.css" />
    <link rel="stylesheet" type="text/css" href="${BASE_PATH}/static/css/manage.css" />
    <script type="text/javascript" src="${BASE_PATH}/static/js/jquery.js"></script>
    <script type="text/javascript" src="${BASE_PATH}/static/js/jquery.pagination.js"></script>
    <script type="text/javascript">
	function doAjaxSubmit(vID,vTypeID)
	{  
		var cValue ="id="+vID+"&type="+vTypeID;
        $.ajax({
            type: "POST",
            url: "${BASE_PATH}/services/doapproval",
			dataType : "json",
			cache : false,
			data : cValue + "&no-cache=" + Math.round(Math.random() * 10000),
			success : onAfterSubmit
		});
	}

	function onAfterSubmit(ret) {
		//保存成功
		if (ret.Code == 1) {
			alert("数据处理完成！");
			window.location.reload();
			return;
		}

		if (ret.Code == 2) {
			alert("数据处理失败！");
			return;
		}

		//验证失败
		if (ret.Code == 3) {
			var vCtrlID = ret.ctrlID;
			var vMessage = ret.message;
			$("#" + vCtrlID).focus();
			alert(vMessage);
			return;
		}
	}		
    </script>
    <title>资源管理</title>
</head>
<body>
    <!--head start-->
    <#include "../common/myspacetop.ftl"/>
    <!--head end-->
    <div class="fnav system_fnav">
        <ul>
            <li><a href="###" target="_top">首页</a></li>
            <li><span>></span></li>
            <li><a href="###" target="_top">我的预约</a></li>
            <li><span>></span></li>
            <li><a href="###" target="_top">所有预约</a></li>
        </ul>
    </div>
    <form id="form1" method="post">
    <div class="my-content">
        <#include "../common/left.ftl"/>
        <div class="coright">
            <#list dbrows as rowkey>
            <div class="coright_list">
                <div class="coright_listc">
                    <div class="coright_listcl">
                        <img src="${BASE_PATH}${rowkey.img_url!''}" />
                    </div>
                    <div class="coright_listcr">
                        <div class="coright_listcrt">
                            <dl class="coright_dltop">
                                <dt class="jc"><span class="jcname">资源名称:</span><span class="jccon">${rowkey.res_title!""}</span></dt>
                                <dd class="jc"><span class="jcname">单位名称:</span><span class="jccon">${rowkey.org_id_name!""}</span></dd>
                                <dd class="jc"><span class="jcname">资源类型:</span><span class="jccon">${rowkey.res_type_name!""}</span></dd>
                                <dd class="zyj">
                                    <span class="jcname">资源简介:</span><span class="jccon">${rowkey.res_summy!""}</span></dd>
                            </dl>
                            <div class="insert">
                                <a href="###" style="color: #0288D1;">查看更多>></a></div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="coright_button">
                            <a href="#" onclick="doAjaxSubmit('${rowkey.id}',1);" class="zt">不通过</a>
                            <a href="#" onclick="doAjaxSubmit('${rowkey.id}',2);" class="zt">通过</a>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
            </#list>
        </div>
    </div>
    </form>
    <div class="clear">
    </div>
    <div class="pages">
        <div id="Pagination">
        </div>
        <div class="searchPage">
            <span class="page-sum">共<strong class="allPage">15</strong>页</span>
            <span class="page-go"> 跳转<input type="text">页</span> 
            <a href="javascript:;" class="page-btn">GO</a>
       	</div>
        <div class="clear">
        </div>
    </div>
</body>
</html>